package com.market.plus.core.dao.jpa;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.market.plus.core.dao.ContentFileDao;
import com.market.plus.core.domain.ContentFile;

@Repository("contentFileDao")
public class JpaContentFileDao extends JpaGenericDao<ContentFile> implements ContentFileDao {

   public JpaContentFileDao() {
      super(ContentFile.class);
   }

   @SuppressWarnings("unchecked")
   public List<ContentFile> findByGUIDs(List<String> contentFileGUIDs) {
      Map<String, Object> params = new HashMap<String, Object>();
      params.put(ContentFile.PARA_GUIDS, contentFileGUIDs);
      List<ContentFile> contentFiles = this.findByNamedQueryAndNamedParams(ContentFile.FIND_GUIDS, params);
      return contentFiles;
   }
}
